package com.cnfangmao.masterdata.model;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * <p>
 * 字段规则关联表
 * </p>
 *
 * @author chenxd
 * @since 2020-04-14
 */
@TableName("t_field_rule")
public class FieldRule implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 字段规则关联Id
     */
    @TableId("field_rule_id")
    private String fieldRuleId;
    /**
     * 规则Id
     */
    @TableField("rule_id")
    private String ruleId;
    /**
     * 规则作用类型
1:全局类型(t_basic_data_field_metadata)
  target_id的值是field_id
2:帐户类型(t_basic_data_field_mapping)
  target_id的值是mapping_id

     */
    @TableField("target_type")
    private Integer targetType;
    /**
     * 规则作用目标
target_type=1时，是field_id
target_type=2时，是mapping_id

     */
    @TableField("target_id")
    private String targetId;
    /**
     * 创建时间
     */
    @TableField("created_on")
    private Date createdOn;
    /**
     * 创建人
     */
    @TableField("created_by")
    private String createdBy;
    /**
     * 修改时间
     */
    @TableField("modified_on")
    private Date modifiedOn;
    /**
     * 修改人
     */
    @TableField("modified_by")
    private String modifiedBy;


    public String getFieldRuleId() {
        return fieldRuleId;
    }

    public void setFieldRuleId(String fieldRuleId) {
        this.fieldRuleId = fieldRuleId;
    }

    public String getRuleId() {
        return ruleId;
    }

    public void setRuleId(String ruleId) {
        this.ruleId = ruleId;
    }

    public Integer getTargetType() {
        return targetType;
    }

    public void setTargetType(Integer targetType) {
        this.targetType = targetType;
    }

    public String getTargetId() {
        return targetId;
    }

    public void setTargetId(String targetId) {
        this.targetId = targetId;
    }

    public Date getCreatedOn() {
        return createdOn;
    }

    public void setCreatedOn(Date createdOn) {
        this.createdOn = createdOn;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public Date getModifiedOn() {
        return modifiedOn;
    }

    public void setModifiedOn(Date modifiedOn) {
        this.modifiedOn = modifiedOn;
    }

    public String getModifiedBy() {
        return modifiedBy;
    }

    public void setModifiedBy(String modifiedBy) {
        this.modifiedBy = modifiedBy;
    }

    @Override
    public String toString() {
        return "FieldRule{" +
        "fieldRuleId=" + fieldRuleId +
        ", ruleId=" + ruleId +
        ", targetType=" + targetType +
        ", targetId=" + targetId +
        ", createdOn=" + createdOn +
        ", createdBy=" + createdBy +
        ", modifiedOn=" + modifiedOn +
        ", modifiedBy=" + modifiedBy +
        "}";
    }
}
